//package com.aliyun.mgt.service.impl;
//
//import com.alibaba.fastjson.JSONObject;
//import MsgSourceService;
//import com.aliyun.mgt.account.domain.model.MsgAdd;
//import com.aliyun.mgt.account.domain.model.MsgSource;
//import com.aliyun.mgt.account.domain.model.query.MsgQuery;
//import com.aliyun.mgt.account.domain.model.vo.DepVo;
//import com.aliyun.mgt.account.domain.model.vo.MessageTypeVO;
//import com.aliyun.mgt.account.domain.model.vo.MsgSourceVO;
//import com.aliyun.mgt.account.domain.model.vo.PendingEventForMsgSourceVO;
//import com.github.pagehelper.Page;
//import com.github.pagehelper.PageInfo;
//import org.junit.Test;
//import org.junit.runner.RunWith;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.boot.test.context.SpringBootTest;
//import org.springframework.test.context.junit4.AbstractTransactionalJUnit4SpringContextTests;
//import org.springframework.test.context.junit4.SpringRunner;
//
//import java.util.List;
//
///**
// * @Author: Xiaohang Lv
// * @Date: 2019/6/6 09:43
// */
//@SpringBootTest
//@RunWith(SpringRunner.class)
//public class MsgSourceServiceImplTest extends AbstractTransactionalJUnit4SpringContextTests {
//    @Autowired
//    MsgSourceService msgSourceService;
//
//    @Test
//    public void countMsgSoueceTest() {
//        MsgQuery msgQuery = new MsgQuery();
//        msgQuery.setCreTimeStart("2020-12-01");
//        msgQuery.setCreTimeEnd("2020-12-03");
//        int i = msgSourceService.countMsgSouece(msgQuery);
//        System.out.println("msgSoueceCount=" + i);
//    }
//
//    @Test
//    public void saveMsgSourceTest() {
//        String requestJson = "{\n" +
//                "  \"msgSourceId\": \"\",                      \n" +
//                "  \"sourceName\": \"测试20200420\",             \n" +
//                "  \"sourceDescription\": \"eddddddd\",         \n" +
//                "  \"pushChannelType\": 1,                    \n" +
//                "  \"pushChannelId\": 7,                      \n" +
//                "  \"pushChannelName\": \"test\",               \n" +
//                "  \"resendChannelId\": 7,                    \n" +
//                "  \"resendChannelName\": \"test\",             \n" +
//                "  \"messageType\": \"0101\",                   \n" +
//                "  \"ownerRequest\": [                         \n" +
//                "    {\n" +
//                "      \"key\": \"320322********4204\",\n" +
//                "      \"name\": \"沈潜\"\n" +
//                "    }\n" +
//                "  ],\n" +
//                "  \"ownerDept\": \"320100013300\",             \n" +
//                "  \"ownerDeptName\": \"一大队\",                \n" +
//                "  \"flowControlTimeUnit\": 1,                 \n" +
//                "  \"flowControlCountLimit\": 100,            \n" +
//                "  \"startTime\": \"2019-06-06 10:57:25\",      \n" +
//                "  \"endTime\": \"2020-09-27 15:57:25\"        \n" +
//                "}";
//        MsgAdd msgAdd = JSONObject.parseObject(requestJson, MsgAdd.class);
//        //System.out.println(msgSourceService.saveMsgSource(msgAdd));
//    }
//
//    @Test
//    public void modMsgSourceTest() {
//        String requestJson = "{\n" +
//                "  \"msgSourceId\": \"\",                      \n" +
//                "  \"sourceName\": \"测试20200420\",             \n" +
//                "  \"sourceDescription\": \"eddddddd\",         \n" +
//                "  \"pushChannelType\": 1,                    \n" +
//                "  \"pushChannelId\": 7,                      \n" +
//                "  \"pushChannelName\": \"test\",               \n" +
//                "  \"resendChannelId\": 7,                    \n" +
//                "  \"resendChannelName\": \"test\",             \n" +
//                "  \"messageType\": \"0101\",                   \n" +
//                "  \"auditStatus\": \"0\",                   \n" +
//                "  \"ownerRequest\": [                         \n" +
//                "    {\n" +
//                "      \"key\": \"320322********4204\",\n" +
//                "      \"name\": \"沈潜\"\n" +
//                "    }\n" +
//                "  ],\n" +
//                "  \"ownerDept\": \"320100013300\",             \n" +
//                "  \"ownerDeptName\": \"一大队\",                \n" +
//                "  \"flowControlTimeUnit\": 1,                 \n" +
//                "  \"flowControlCountLimit\": 100,            \n" +
//                "  \"startTime\": \"2019-06-06 10:57:25\",      \n" +
//                "  \"endTime\": \"2020-09-27 15:57:25\"        \n" +
//                "}";
//        MsgAdd msgAdd = JSONObject.parseObject(requestJson, MsgAdd.class);
//        System.out.println(msgSourceService.modMsgSource(msgAdd));
//    }
//
//    @Test
//    public void msgSourceListTest() {
//        MsgQuery msgQuery = new MsgQuery();
//        msgQuery.setRole(1).setUserId("330211199504230049").setDepartment("320000000000");
//        System.out.println(JSONObject.toJSONString(msgSourceService.listMsgSouece(msgQuery)));
//    }
//
//    @Test
//    public void addMsgSourceTest() {
//        String requestJson = "{\n" +
//                "  \"msgSourceId\": \"\",                      \n" +
//                "  \"sourceName\": \"测试20200420\",             \n" +
//                "  \"sourceDescription\": \"eddddddd\",         \n" +
//                "  \"pushChannelType\": 1,                    \n" +
//                "  \"pushChannelId\": 7,                      \n" +
//                "  \"pushChannelName\": \"test\",               \n" +
//                "  \"resendChannelId\": 7,                    \n" +
//                "  \"resendChannelName\": \"test\",             \n" +
//                "  \"messageType\": \"0101\",                   \n" +
//                "  \"ownerRequest\": [                         \n" +
//                "    {\n" +
//                "      \"key\": \"320322********4204\",\n" +
//                "      \"name\": \"沈潜\"\n" +
//                "    }\n" +
//                "  ],\n" +
//                "  \"ownerDept\": \"320100013300\",             \n" +
//                "  \"ownerDeptName\": \"一大队\",                \n" +
//                "  \"flowControlTimeUnit\": 1,                 \n" +
//                "  \"flowControlCountLimit\": 100,            \n" +
//                "  \"startTime\": \"2019-06-06 10:57:25\",      \n" +
//                "  \"endTime\": \"2020-09-27 15:57:25\"        \n" +
//                "}";
//        MsgAdd msgAdd = JSONObject.parseObject(requestJson, MsgAdd.class);
//        //System.out.println(msgSourceService.addMsgSource(msgAdd));
//    }
//
//    @Test
//    public void msgSourceDetailTest() {
//        MsgQuery msgQuery = new MsgQuery();
//        msgQuery.setMsgSourceId(253);
//        MsgSourceVO msgSourceVO = msgSourceService.msgSourceDetail(msgQuery);
//    }
//
//    @Test
//    public void queryMsgListTest() {
//        MsgQuery msgQuery = new MsgQuery();
//        msgQuery.setCreTimeStart("2020-12-01");
//        msgQuery.setCreTimeEnd("2020-12-03");
//        PageInfo<MsgSourceVO> msgSourceVOPageInfo = msgSourceService.queryMsgList(msgQuery);
//    }
//
//    @Test
//    public void msgSourceToDealTest() {
//        MsgQuery msgQuery = new MsgQuery();
//        msgQuery.setRoleCode(1);
//        PageInfo<PendingEventForMsgSourceVO> pendingEventForMsgSourceVOPageInfo = msgSourceService.msgSourceToDeal(msgQuery);
//    }
//
//    @Test
//    public void listOwnerDeptTest() {
//        MsgQuery msgQuery = new MsgQuery();
//        msgQuery.setCreTimeStart("2020-12-01");
//        msgQuery.setCreTimeEnd("2020-12-03");
//        List<DepVo> depVos = msgSourceService.listOwnerDept(msgQuery);
//    }
//
//    @Test
//    public void listOwnerDeptForMessageTest() {
//        MsgQuery msgQuery = new MsgQuery();
//        msgQuery.setCreTimeStart("2020-12-01");
//        msgQuery.setCreTimeEnd("2020-12-03");
//        List<DepVo> depVos = msgSourceService.listOwnerDeptForMessage(msgQuery);
//    }
//
//    @Test
//    public void deleteMsgSourceTest() {
//        MsgQuery msgQuery = new MsgQuery();
//        msgQuery.setMsgSourceId(253);
//        List<DepVo> depVos = msgSourceService.listOwnerDeptForMessage(msgQuery);
//    }
//
//    @Test
//    public void listMessageTypesTest() {
//        List<MessageTypeVO> messageTypeVOS = msgSourceService.listMessageTypes();
//    }
//
//    @Test
//    public void smsMsgSourceListTest() {
//        MsgQuery msgQuery = new MsgQuery();
//        Page<MsgSourceVO> msgSourceVOS = msgSourceService.smsMsgSourceList(msgQuery);
//    }
//
//    @Test
//    public void getMsgSourceBySourceIdTest() {
//        MsgSource msgSourceBySourceId = msgSourceService.getMsgSourceBySourceId("znts");
//    }
//}
